package com.levelup.cr.services.impl;

import com.levelup.cr.model.Node;
import com.levelup.cr.services.NodeListService;
import com.levelup.cr.services.RepositoryResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: denis_zavadsky
 * Date: 9/7/13
 * Time: 12:01 PM
 * To change this template use File | Settings | File Templates.
 */
@Service("nodeListService")
public class NodelListServiceImpl implements NodeListService{

    @Autowired
    RepositoryResolver repositoryResolver;

    public void setRepositoryResolver(RepositoryResolver repositoryResolver) {
        this.repositoryResolver = repositoryResolver;
    }

    @Override
    public Node getNodeByPath(String rootPath, int nestedLevel) {
        Node rootNode = repositoryResolver.getNodeByPath(rootPath, nestedLevel);
        return rootNode;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
